<template>
<div>
   <el-form :inline="true">
     <el-form-item >
        <el-button
          type="primary"
          @click="flush"
          icon="export"
        >重新汇总</el-button>
      </el-form-item>
    </el-form>
  <BrowseDataList
    :cate="cate"
    :cols="cols"
    :name="name"
  />
</div>
</template>
<script>
import { showLoading, hideLoading } from "@/utils/loading"
import BrowseDataList from "@/components/BrowseDataList";
import { getUser } from "@/utils/auth";
import { getJfsr } from "@/api/经费收入.js";
import { setSaveAfter2019 } from "@/api/案例分析.js";
export default {
  components: {
    BrowseDataList
  },
  data() {
    return {
      name:'5.1 经费收入',
      cate: "经费收入",
      cols: [
        { label: "学校总收入（万元）", prop: "XXZSR" },
        { label: "学费收入合计（万元）", prop: "XFSR" },
        {
          label: "财政经常性补助收入合计（万元）",
          prop: "CZJCXBZSR"
        },
        {
          label: "中央、地方财政专项投入合计（万元）",
          prop: "ZYDFCZZXTR"
        },
        { label: "社会捐赠金额（万元）", prop: "SHJZJE" },
        { label: "其他收入总额（万元）", prop: "QTSRZE" },
        { label: "贷款金额（万元）", prop: "DKJE" },
        { label: "贷款余额（万元）", prop: "DKYE" }
      ]
    };
  },
  
  methods: {
    async flush() {
    try {
      showLoading();
      var user = getUser();
      await setSaveAfter2019(user.XXID, user.CJPC);
      hideLoading();
    } catch (e) {
      this.$alert(e);
    }
  },
    async fetchData() {
      var user = getUser();
      var datas = await getJfsr(user.XXID, user.CJPC);
      return datas;
    }
  }
};
</script>

